namespace CloundNinja.Metering.RowCountsProvider.Configuration
{
    using System.Configuration;

    public class TenantRowCountMeteringProviderSettings : ConfigurationElement
    {
        [ConfigurationProperty("DefaultTenantIdPattern", IsRequired = true, DefaultValue = "tnt_{.+}")]
        public string DefaultTenantIdPattern
        {
            get
            {
                return (string)this["DefaultTenantIdPattern"];
            }

            set
            {
                this["DefaultTenantIdPattern"] = value;
            }
        }

        [ConfigurationProperty("StorageAccounts", IsDefaultCollection = false), ConfigurationCollection(typeof(TenantRowCountConnectionCollectionElement), AddItemName = "addConnection", ClearItemsName = "clearConnection", RemoveItemName = "removeConnection")]
        public TenantRowCountConnectionCollection StorageAccounts
        {
            get
            {
                return this["StorageAccounts"] as TenantRowCountConnectionCollection;
            }

            set
            {
                this["StorageAccounts"] = value;
            }
        }
    }
}